# Filters added to this controller will be run for all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
    
    def data_to_file
      file_data = params[:content]
      suggestion = params[:suggested_name]
      data_type = [:content_type].to_s
      dest = params[:destination]
      send_data(file_data, :filename => suggestion, :type => data_type, :disposition => dest)
    end
    
end